<template>
  <div class="tab-head">
    <p class="proTitleRight" v-if="route.name !== 'Dmy'">欢迎，{{ appStore.userInfo.userName }}</p>
    <p class="proTitle">{{ appStore.projectInfo.projectShortName }}</p>
  </div>
</template>

<script>
import { defineComponent, ref } from "vue";
import { useRoute } from "vue-router";
import { useAppStore } from "@/store";
export default defineComponent({
  name: 'TabHead',
  setup() {
    const appStore = useAppStore();
    const route = useRoute()
    return { appStore, route };
  },
});
</script>

<style lang="less" scoped>
.tab-head {
  width: 100%;
  height: 100px;
  background: url('../../../assets/images/apphead.png') no-repeat;
  background-size: 100% 100%;
}

.proTitle {
  font-size: 30px;
  color: #fff;
  font-weight: bold;
  text-align: center;
  line-height: 80px;
}

.proTitleRight {
  font-size: 18px;
  position: absolute;
  color: #fff;
  right: 10px;
  text-align: right;
  height: 20px;
  padding-top: 8px;
  padding-right: 10px;
}
</style>
